package com.xw.demo.mybatis.service.impl;

import com.xw.demo.mybatis.entity.ImageSource;
import com.xw.demo.mybatis.mapper.ImageSourceMapper;
import com.xw.demo.mybatis.service.ImageSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xiongwei_vendor
 * @date 2021/12/31 16:07
 */
@Service
public class ImageSourceServiceImpl implements ImageSourceService {

    @Autowired
    private ImageSourceMapper imageSourceMapper;

    public List<ImageSource> findImageSourceList() {
        return imageSourceMapper.findObjectList();
    }

    public ImageSource getImageSourceById(String id) {
        return imageSourceMapper.getObjectById(id);
    }

    public boolean insertImageSource(ImageSource createImageSource) {
        return imageSourceMapper.insertObject(createImageSource);
    }

    public boolean deleteImageSource(String id) {
        return imageSourceMapper.deleteObject(id);
    }

}
